using UnityEngine;
using System.Collections;

public class StateTorreDie : State<TorretaControl> 
{
	static StateTorreDie m_instance = new StateTorreDie();
    public static StateTorreDie instance { get { return m_instance; } }

    public override void OnEnter(TorretaControl behaviour)
    {
		foreach(Transform tr in behaviour.listaEnemigos) {
			VampiroControl vc = tr.GetComponent("VampiroControl") as VampiroControl;
			vc.EnemigoMuerto(behaviour.transform);
		 	//tr.SendMessage("EnemigoMuerto", behaviour.transform);
		}
        //animacion
    }

    public override void OnUpdate(TorretaControl behaviour)
    {
        behaviour.Destruir();
    }

    public override void OnExit(TorretaControl behaviour)
    {
      
    }

    public override void OnAction(string name, TorretaControl behaviour, object value)
    {
        
    }

}
